/*
 * Copyright 2011 CyberSMS.ru
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ru.cybersms.model.obj;

import java.util.Date;

/**
 *
 * @author Андрей Шерцингер <support@cybersms.ru>
 */
public class Task {

	public enum RepeatType {

		day, week, month, year;
	}

	public enum MessageType {

		message, bulk, application;
	}
	private Integer id;
	private String name;
	private Date start_at;
	private Date expires_at;
	private RepeatType repeat;
	private boolean active;
	private MessageType type;
	private Message message;
	private Integer bulk_id;
	private Integer application_id;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getStart_at() {
		return start_at;
	}

	public void setStart_at(Date start_at) {
		this.start_at = start_at;
	}

	public Date getExpires_at() {
		return expires_at;
	}

	public void setExpires_at(Date expires_at) {
		this.expires_at = expires_at;
	}

	public RepeatType getRepeat() {
		return repeat;
	}

	public void setRepeat(RepeatType repeat) {
		this.repeat = repeat;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public MessageType getType() {
		return type;
	}

	public void setType(MessageType type) {
		this.type = type;
	}

	public Message getMessage() {
		return message;
	}

	public void setMessage(Message message) {
		this.type = MessageType.message;
		this.message = message;
	}

	public Integer getBulk_id() {
		return bulk_id;
	}

	public void setBulk_id(Integer bulk_id) {
		this.type = MessageType.bulk;
		this.bulk_id = bulk_id;
	}

	public Integer getApplication_id() {
		return application_id;
	}

	public void setApplication_id(Integer application_id) {
		this.type = MessageType.application;
		this.application_id = application_id;
	}
}
